<!--车辆信息-->
<template>
  <div class="common-body-wrapper">
    <search-header
      single-width="130"
      :searchList="searchList"
      @changeHeight="toRetTable"
      @confirmSearch="toSearch"
      :isNeedTree="false"
      :paramName="paramName"
      @setSelectedNode="setSelectedNode"
    ></search-header>
    <div class="common-table-tree-wrapper">
      <!-- <table-tree :isNeedTree="isNeedTree" @toggleTreeBox="toggleTreeBox" @setSelectedNode="setSelectedNode" @searchFn="getList">
      </table-tree>-->

      <div class="common-table-wrapper">
        <multi-fun-table
          :sortColumn="notFormatColumn"
          :orderType="sortType"
          :fixed-cols="fixedCols"
          :is-reset-table="isResetTable"
          :theads-info="theadsInfo"
          :tbodys-info="tbodysInfo"
          @handleMultiCheck="handleMultiCheck"
          @handleSortColumn="handleSortColumn"
          @searchFn="getList"
          @getNextPage="getNextPage"
        >
          <!--暂时不需要停车场树，因为车辆在运营商维度下的 :isNeedTree="isNeedTree"-->
          <div class="operate-btn-group" slot="operateBtnGroup">
            <a
              class="ake_btn ake_btn_text"
              v-if="isPermmited('PARK_CAR:PARK_CUSTOMER_CAR:EXPORT')"
              @click.prevent="exportData()"
            >导出</a>
          </div>
          <template slot="tdCell" slot-scope="props">
            <el-table-column
              :fixed="props.fixed"
              :label="props.label"
              :min-width="props.minWidth"
              :width="props.width"
              :prop="props.prop"
              :sortable="props.sortable"
            >
              <template slot-scope="scope">
                <span v-if="'reno' == props.prop">{{scope.$index+1}}</span>
                <span v-else>{{ scope.row[props.prop] }}</span>
              </template>
            </el-table-column>
          </template>
        </multi-fun-table>

        <table-pagination :size="total" :cur-page="pageNumber" @backData="getPagination"></table-pagination>
      </div>
    </div>

    <big-pic-modal ref="bigPicModal">
      <img
        slot="bigImgSlot"
        :src="bigImgPath | setImgPath"
        alt
        @error="imgError('../../', 'car', $event)"
      />
    </big-pic-modal>
  </div>
</template>

<script>
import common from "@mixins/common.js";
import stardardList from "@mixins/tables/stardardList.js";

//modal
import invokeModal from "@mixins/modal/invokeModal.js";
import BigPicModal from "@components/widgets/BigPicModal.vue";

// image
import images from "@mixins/image.js";

// 引进vue的js
import park_customer_car from "./js/park_customer_car.js";
export default {
  mixins: [common, stardardList, invokeModal, images, park_customer_car],
  components: {
    BigPicModal
  },
  data() {
    const today = [
      new Date(moment().format("YYYY-MM-DD 00:00:00")),
      new Date(moment().format("YYYY-MM-DD 23:59:59"))
    ];

    return {
      fixedCols: 3,
      total: 0,
      //prop-返回数据的字段名称   proisNotInter:true,pNameisNotInter:true,，name-查询字段传参名称    text-显示名称  //initHidden  初始化不显示
      searchList: [
        {
          type: "text",
          isShow: false,
          name: "carLicenseNumber",
          text: "车牌号",
          value: ""
        },
        {
          type: "text",
          isShow: false,
          name: "carCardNumber",
          text: "卡号",
          value: ""
        },
        {
          type: "text",
          isShow: false,
          name: "customerName",
          text: "车主姓名",
          value: ""
        },

        {
          type: "select",
          isShow: false,
          name: "carOwnType",
          text: "公、私车",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "未知", value: "0" },
            { name: "公车", value: "1" },
            { name: "私车", value: "2" }
          ]
        },

        {
          type: "select",
          isShow: false,
          name: "carColor",
          text: "车辆颜色",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "未知", value: "0" },
            { name: "白色", value: "1" },
            { name: "黑色", value: "2" },
            { name: "红色", value: "3" },
            { name: "绿色", value: "4" },
            { name: "粉色", value: "5" },
            { name: "蓝色", value: "6" },
            { name: "紫色", value: "7" },
            { name: "灰色", value: "8" },
            { name: "雪青", value: "9" },
            { name: "葱绿", value: "10" },
            { name: "黄色", value: "11" },
            { name: "橙色", value: "12" },
            { name: "其他", value: "13" }
          ]
        },

        {
          type: "select",
          isShow: false,
          name: "carLogo",
          text: "车辆品牌",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "未知", value: "0" },
            { name: "雪佛兰", value: "1" },
            { name: "日产", value: "2" },
            { name: "福特", value: "3" },
            { name: "本田", value: "4" },
            { name: "丰田", value: "5" },
            { name: "别克", value: "6" },
            { name: "现代", value: "7" },
            { name: "吉利", value: "8" },
            { name: "起亚", value: "9" },
            { name: "斯柯达", value: "10" },
            { name: "比亚迪", value: "11" },
            { name: "奥迪", value: "12" },
            { name: "雪铁龙", value: "13" },
            { name: "荣威", value: "14" },
            { name: "奇瑞", value: "15" },
            { name: "宝马", value: "16" },
            { name: "长安", value: "17" },
            { name: "铃木", value: "18" },
            { name: "马自达", value: "19" },
            { name: "传祺", value: "20" },
            { name: "海马", value: "21" },
            { name: "奔腾", value: "22" },
            { name: "标志", value: "23" },
            { name: "绅宝", value: "24" },
            { name: "启辰", value: "25" },
            { name: "奔驰", value: "26" },
            { name: "菲亚特", value: "27" },
            { name: "青年莲花", value: "28" },
            { name: "凯迪拉克", value: "29" },
            { name: "东南", value: "30" },
            { name: "长城", value: "31" },
            { name: "宝骏", value: "32" },
            { name: "众泰", value: "33" },
            { name: "夏利", value: "34" },
            { name: "东风风神", value: "35" },
            { name: "华泰", value: "36" },
            { name: "北京汽车", value: "37" },
            { name: "其他", value: "38" }
          ]
        }
      ],
      theadsInfo: [
        { index: 0, isShow: false, prop: "reno", text: "序号", width: 64 },
        {
          index: 1,
          isShow: false,
          prop: "carLicenseNumber",
          text: "车牌号",
          sortable: true,
          minWidth: 120
        },
        {
          index: 2,
          isShow: false,
          prop: "carCardNumber",
          text: "卡号",
          sortable: true,
          minWidth: 160
        },
        {
          index: 3,
          isShow: false,
          prop: "carOwnTypeStr",
          text: "公、私车",
          sortable: true,
          minWidth: 160
        },
        {
          index: 4,
          isShow: false,
          prop: "customerName",
          text: "车主姓名",
          sortable: true,
          minWidth: 160
        },
        {
          index: 5,
          isShow: false,
          prop: "carLogoStr",
          text: "车辆品牌",
          sortable: true,
          minWidth: 120
        },
        {
          index: 6,
          isShow: false,
          prop: "carColorStr",
          text: "车辆颜色",
          sortable: true,
          minWidth: 120
        },
        {
          index: 7,
          isShow: false,
          prop: "carModel",
          text: "车辆型号",
          sortable: true,
          minWidth: 120
        },
        {
          index: 8,
          isShow: false,
          prop: "modifyBy",
          text: "最近操作员",
          sortable: true,
          minWidth: 160
        },
        {
          index: 9,
          isShow: false,
          prop: "modifyTime",
          text: "最近操作时间",
          sortable: true,
          minWidth: 200
        }
      ],
      tbodysInfo: []
    };
  },
  methods: {}
};
</script>

<style lang="less" scoped>
</style>